package com.ego.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ego.admin.po.SysCaptcha;

import java.awt.image.BufferedImage;

/**
 * @program: ego
 * @description: 验证码
 * @author: KamTang
 * @create: 2022-11-12 15:03
 **/
public interface SysCaptchaService extends IService<SysCaptcha> {
    /**
     * 根据uuid获取验证码
     *
     * @param uuid 前端传来的uuid
     * @return 图片流对象
     */
    BufferedImage get(String uuid);

    /**
     * 验证码效验
     * @param uuid  uuid
     * @param code  验证码
     * @return  true：成功  false：失败
     */
    boolean validate(String uuid, String code);
}
